import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '../views/Home.vue';

Vue.use(VueRouter);

const routes = [
	{
		path: '/',
		// name: 'Home',
		// component: Home,
		redirect: '/login'
	},
	{
		path: '/about',
		name: 'About',
		// route level code-splitting
		// this generates a separate chunk (about.[hash].js) for this route
		// which is lazy-loaded when the route is visited.
		component: () =>
			import(/* webpackChunkName: "about" */ '../views/About.vue'),
	},
	{
		path: '/register',
		name: 'register',
		component: () => import('../views/Register.vue'),
	},
	{
		path: '/login',
		name: 'login',
		component: () => import('../views/Login.vue'),
	},
	{
		path: '/adminlogin',
		name: 'adminlogin',
		component: () => import('../views/Login.vue'),
	},
	{
		path: '/adminindex',
		name: 'adminindex',
		component: () => import('../views/admin/index.vue'),
	},
	{
		path: '/index',
		name: 'index',
		component: () => import('../views/proj/index.vue'),
	},
	{
		path: '/detail',
		name: 'detail',
		component: () => import('../views/proj/Detail.vue')
	}
];

const router = new VueRouter({
	routes,
});

export default router;
